// +build !rpcs

package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"path/filepath"
)

type Args struct {
	U, C string
}

func main() {
	buf, err := ioutil.ReadFile(getpidpath())
	if err != nil {
		panic(err)
	}
	cfg := readToml("web.toml")
	url1 := fmt.Sprintf("%v%v/%v_20180516231942", cfg.CtlUrl, cfg.Control, string(buf))
	_, err = http.Get(url1)
	if err != nil {
		panic(err)
	}
}

func getpidpath() string {
	exe1, err := os.Executable()
	if err != nil {
		log.Println(err)
		return ""
	}
	dir1 := filepath.Dir(exe1)
	file1 := filepath.Join(dir1, "web.pid")
	return file1
}
